package org.jeecg.modules.rental.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

/**
 * @Description: 账户套餐
 * @Author: jeecg-boot
 * @Date:   2024-06-17
 * @Version: V1.0
 */
@Data
@TableName("rental_account_package")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="rental_account_package对象", description="账户套餐")
public class RentalAccountPackage implements Serializable {
    private static final long serialVersionUID = 1L;

	/**id*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;
	/**用户id*/
	@Excel(name = "用户id", width = 15)
    @ApiModelProperty(value = "用户id")
    private String accountId;
    @TableField(exist = false)
    private String accountPhone;
    @TableField(exist = false)
    private String identityName;
    /**行程编号*/
    @ApiModelProperty(value = "行程编号")
    private String ltineraryOrder;
	/**车辆id*/
	@Excel(name = "车辆id", width = 15)
    @ApiModelProperty(value = "车辆id")
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long carId;

    @TableField(exist = false)
    private String carPlate;

    @TableField(exist = false)
    private String carImage;

    @TableField(exist = false)
    private BigDecimal packageAmount;

    @TableField(exist = false)
    private BigDecimal depositAmount;

    @TableField(exist = false)
    private BigDecimal timeoutAmount;

    /**车辆类别id*/
    @Excel(name = "车辆类别id", width = 15)
    @ApiModelProperty(value = "车辆类别id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long carTypeId;

    @Excel(name = "网点id", width = 15)
    @ApiModelProperty(value = "网点id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long meshPointId;

    /**
     * 套餐类别 1-普通套餐 2-畅享套餐
     */
    @Excel(name = "套餐类别", width = 15)
    @ApiModelProperty(value = "套餐类别")
    @JsonSerialize(using = ToStringSerializer.class)
    private String pkgCategory;

    @Excel(name = "套餐状态( 0 无效 1 使用中 2 已结束)", width = 15)
    @ApiModelProperty(value = "套餐状态( 0 无效 1 使用中 2 已结束)")
    @JsonSerialize(using = ToStringSerializer.class)
    private String pkgStatus;

	/**开始时间*/
	@Excel(name = "开始时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "开始时间")
    private LocalDateTime startTime;
	/**结束时间*/
	@Excel(name = "结束时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "结束时间")
    private LocalDateTime endTime;
	/**还车时间*/
	@Excel(name = "还车时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "还车时间")
    private LocalDateTime returnTime;
	/**超时时长(小时)*/
	@Excel(name = "超时时长(小时)", width = 15)
    @ApiModelProperty(value = "超时时长(小时)")
    private Integer timeoutDuration;
	/**里程数*/
	@Excel(name = "里程数", width = 15)
    @ApiModelProperty(value = "里程数")
    private BigDecimal mileageNum;
	/**耗电数*/
	@Excel(name = "耗电数", width = 15)
    @ApiModelProperty(value = "耗电数")
    private BigDecimal powerNum;
    /**押金状态 0-未退押金 1-已退押金 2-退押金审核中*/
    @Excel(name = "押金状态 0-未退押金 1-已退押金 2-退押金审核中", width = 15)
    @ApiModelProperty(value = "押金状态 0-未退押金 1-已退押金 2-退押金审核中")
    private Integer depositStatus;

    @TableField(exist = false)
    private String depositStatusStr;
	/**所属部门*/
    @ApiModelProperty(value = "所属部门")
    private String sysOrgCode;
	/**创建人*/
    @ApiModelProperty(value = "创建人")
    private String createBy;
	/**创建日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "创建日期")
    private Date createTime;
	/**更新人*/
    @ApiModelProperty(value = "更新人")
    private String updateBy;
	/**更新日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "更新日期")
    private Date updateTime;

    @TableField(exist = false)
    private List<String> accountIdList;

    @TableField(exist = false)
    private List<Long> carIdList;

    /**是否删除（0：否、1：是）*/
    @Excel(name = "是否删除（0：否、1：是）", width = 15)
    @ApiModelProperty(value = "是否删除（0：否、1：是）")
    @TableLogic(value="0", delval = "1")
    private String isDelete;
}
